<template>
  <div>
    <div class="dashboard-container">
      

      <div class="big-back-box">
        <div class="top" style="margin-bottom: 20px">成功案例详情</div>
        <!-- 卡片 -->
        <div style="width: 600px; margin: 0 auto">
          <el-form ref="form" :model="form" label-width="80px">
            <!-- 标题 -->
            <el-form-item label="标题">
              <el-input v-model="form.title" :disabled="true"></el-input>
            </el-form-item>
            <!-- 图片 -->
            
            <!-- 详细内容 -->
            <!--  v-model="form.content" -->
            <!-- 
                <el-input
                v-html="form.content"
                type="textarea"
                 
                rows="30"
                cols="30"
                :disabled="true"
              ></el-input>
             -->
            <el-form-item label="详细内容">
              <div
               class="contentDiv"
               v-html="form.content"
              >
              </div>

            
            </el-form-item>
            <!-- 按钮 -->
            <el-form-item>
              <router-link to="/successCase/articleList">
                <el-button>返回</el-button>
              </router-link>
              
            </el-form-item>
          </el-form>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
// 根据文章标题展示文章详情
import {getArticleByTitle,getArticleById } from '@/api/article.js'

export default {
  mounted(){
    getArticleById(this.$route.query.id).then(res=>{
      this.form=res.data.article;
})     
  },
  data() {
    return {
      size: "",
      form: {},
    };
  },
  methods: {
    onSubmit() {
      console.log("submit!");
    },
  },
};
</script>

<style lang="scss" scoped>

.contentDiv{
  border: solid 1px silver;
}
// 页头LOGO
.top {
  height: 50px;
  font-size: 30px;
  text-align: center;
  line-height: 50px;
}

// 大盒子
.big-back-box {
  width: 1080px;
  margin: 0 auto;
}

// 原框架自带
.dashboard {
  &-container {
    margin-top: 30px;
    // margin-left: 30px;
    // margin-right: 30px;
  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}

// 页脚
.footer {
  height: 300px;
  background-color: blue;
}
.footer-back-box {
  width: 1080px;
  margin-left: 45px;
}
.footer-title {
  height: 30px;
  line-height: 40px;
  padding-left: 10px;
}
.footer-link-card {
  width: 200px;
  background-color: orange;
  margin-left: 10px;
}

// 模板-卡片
.text {
  font-size: 14px;
}
.item {
  padding: 18px 0;
}
.box-card {
  width: 480px;
}
</style>